package inesv.activeMQ.activeMQ_springboot;

import org.apache.activemq.command.ActiveMQQueue;
import org.apache.activemq.command.ActiveMQTopic;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * 消息目的地列表
 */
@Configuration
public class DestinationList {

    final static String test_queue="test_queue";

    final static String test_topic="test_topic";

    final static String schedule_queue="schedule_queue"; //延迟消息

    @Bean(name=test_queue)
    public ActiveMQQueue test_queue(){
        return new ActiveMQQueue(test_queue);
    }

    @Bean(name=test_topic)
    public ActiveMQTopic test_topic(){
        return new ActiveMQTopic(test_topic);
    }

    @Bean(name=schedule_queue)
    public ActiveMQQueue schedule_queue(){
        return new ActiveMQQueue(schedule_queue);
    }

}
